// savedatathread.h
#ifndef SAVEDATATHREAD_H
#define SAVEDATATHREAD_H

#include <QThread>
#include <QVector>
#include <QStringList>

class SaveDataThread : public QThread
{
    Q_OBJECT
public:
    explicit SaveDataThread(const QVector<QVector<double>> &data,
                            const QStringList &headers,
                            const QString &fileName,
                            QObject *parent = nullptr);

signals:
    void saveSuccess();
    void saveFailed(const QString &errorMsg);

protected:
    void run() override;

private:
    QVector<QVector<double>> m_data;
    QStringList m_headers;
    QString m_fileName;
};

#endif // SAVEDATATHREAD_H
